home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / samba / patches / samba-1.015 / samba-1
Text File  |  1995-07-03  |  18KB  |  604 lines

  1. diff -u -r --new-file last-version/docs/DIAGNOSIS.txt samba-1.9.14alpha5/docs/DIAGNOSIS.txt
  2. --- last-version/docs/DIAGNOSIS.txt    Fri Jun 30 13:59:13 1995
  3. +++ samba-1.9.14alpha5/docs/DIAGNOSIS.txt    Sun Jul  2 20:32:08 1995
  4. @@ -118,20 +118,28 @@
  5.  run the command "nmbd -L ACLIENT"
  6.  
  7.  This time we are trying the same as the previous test but are trying
  8. -it via a broadcast to the default broadcast address. If this doesn't
  9. -give the same result as the previous test then nmbd isn't correctly
  10. -getting your broadcast address. You should experiment with the -B
  11. -option, trying different broadcast addresses until your find the one
  12. -that works. It will most likely be something like a.b.c.255 as
  13. -microsoft tcpip stacks only listen on 1's based broadcast addresses.
  14. +it via a broadcast to the default broadcast address. 
  15.  
  16. -Once you have it right you should add the -B option the the command
  17. -line of nmbd in inetd.conf or in the script you use to start nmbd as
  18. -a daemon. Once you do this go back to the "nmbd -L __SAMBA__ -B
  19. -BIGSERVER" test to make sure you have it running properly.
  20. +If this doesn't give the same result as the previous test then nmbd
  21. +isn't correctly getting your broadcast address through its automatic
  22. +mechanism. In this case you should experiment with the -B option which
  23. +allows you to manually specify the broadcast address, overriding the
  24. +automatic detection. You should try different broadcast addresses
  25. +until your find the one that works. It will most likely be something
  26. +like a.b.c.255 as microsoft tcpip stacks only listen on 1's based
  27. +broadcast addresses. If you get stuck then ask your local networking
  28. +guru for help (and show them this paragraph).
  29.  
  30. +If you find you do need the -B option (ie. the automatic detection
  31. +doesn't work) then you should add the -B option with the right
  32. +broadcast address for your network to the command line of nmbd in
  33. +inetd.conf or in the script you use to start nmbd as a daemon. Once
  34. +you do this go back to the "nmbd -L __SAMBA__ -B BIGSERVER" test to
  35. +make sure you have it running properly.
  36. +
  37.  If your PC and server aren't on the same subnet then you will need to
  38. -use -B to set the broadcast address to the that of the PCs subnet.
  39. +use the -B option to set the broadcast address to the that of the PCs
  40. +subnet.
  41.  
  42.  TEST 7:
  43.  -------
  44. diff -u -r --new-file last-version/examples/dce-dfs/README samba-1.9.14alpha5/examples/dce-dfs/README
  45. --- last-version/examples/dce-dfs/README    Thu Jan  1 10:00:00 1970
  46. +++ samba-1.9.14alpha5/examples/dce-dfs/README    Mon Jul  3 11:26:35 1995
  47. @@ -0,0 +1,4 @@
  48. +this is a sample configuration file from Jim Doyle <doyle@oec.com> who
  49. +did the DCE/DFS patches for Samba. It shows how to make DCE/DFS shares
  50. +available. 
  51. +
  52. diff -u -r --new-file last-version/examples/dce-dfs/smb.conf samba-1.9.14alpha5/examples/dce-dfs/smb.conf
  53. --- last-version/examples/dce-dfs/smb.conf    Thu Jan  1 10:00:00 1970
  54. +++ samba-1.9.14alpha5/examples/dce-dfs/smb.conf    Mon Jul  3 11:24:29 1995
  55. @@ -0,0 +1,42 @@
  56. +[global]
  57. +   printing = bsd
  58. +   printcap name = /etc/printcap
  59. +   load printers = no
  60. +   guest account = guest
  61. +   log file = /usr/local/samba/var/log.%m
  62. +   log level = 8
  63. +   password level = 8
  64. +
  65. +[homes]
  66. +   comment = Home Directories
  67. +   browseable = no
  68. +   read only = no
  69. +   create mode = 0750
  70. +
  71. +[test]
  72. +   comment = test stuff
  73. +   path = /dept/mis/home/testacct
  74. +   valid users = testacct
  75. +   public = no
  76. +   writable = yes
  77. +
  78. +[namespace]
  79. +   comment = DCE-DFS Global Root 
  80. +   path = /...
  81. +   public = no
  82. +   writable = yes
  83. +
  84. +[oecdfs]
  85. +   comment = Corporate Cell
  86. +   path = /.../corp.boston.oec.com/fs
  87. +   browseable = no
  88. +   read only = no
  89. +   create mode = 0750
  90. +
  91. +[develdfs]
  92. +   comment = Technology Development Cell
  93. +   path = /.../devel.boston.oec.com/fs
  94. +   browseable = no
  95. +   read only = no
  96. +   create mode = 0750
  97. +
  98. diff -u -r --new-file last-version/source/Makefile samba-1.9.14alpha5/source/Makefile
  99. --- last-version/source/Makefile    Fri Jun 30 17:13:05 1995
  100. +++ samba-1.9.14alpha5/source/Makefile    Mon Jul  3 10:00:20 1995
  101. @@ -125,14 +125,14 @@
  102.  ######################################
  103.  
  104.  
  105. -# This is for SUNOS 4. Use the SOLARIS entry for SunOS 5.
  106. +# This is for SUNOS 4. Use the SUNOS5 entry for Solaris 2.
  107.  # Note that you cannot use Suns "cc" compiler
  108.  # as it's not an Ansi-C compiler. Get gcc or acc. 
  109.  # Note that if you have adjunct passwords you may need the GETPWANAM 
  110.  # or PWDAUTH option. There have been reports that using PWDAUTH may crash
  111.  # your pwdauthd server so GETPWANAM is preferable (and probably faster)
  112.  # contributed by Andrew.Tridgell@anu.edu.au
  113. -# FLAGSM = -DSUN
  114. +# FLAGSM = -DSUNOS4
  115.  # LIBSM =   
  116.  
  117.  
  118. @@ -149,9 +149,9 @@
  119.  # LIBSM = 
  120.  
  121.  
  122. -# This is for SOLARIS 2.2 and above (aka SunOS 5)
  123. +# This is for SUNOS5 (also known as Solaris 2)
  124.  # contributed by Andrew.Tridgell@anu.edu.au
  125. -# FLAGSM = -DSOLARIS -DSHADOW_PWD -DNETGROUP -DBSD_COMP
  126. +# FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP -DBSD_COMP
  127.  # LIBSM = -lsocket -lnsl
  128.  
  129.  
  130. @@ -392,7 +392,8 @@
  131.  CFLAGS  = $(CFLAGS1) $(CFLAGS2) $(CFLAGS3) $(CFLAGS4) $(FLAGSM) $(AFS_FLAGS) $(DCE_FLAGS)
  132.  LIBS = $(LIBS1) $(LIBSM) $(DCE_LIBS)
  133.  
  134. -PROGS = smbd smbclient nmbd testparm testprns smbrun smbstatus smbtar
  135. +PROGS = smbd smbclient nmbd testparm testprns smbrun smbstatus
  136. +SCRIPTS = smbtar
  137.  
  138.  all : CHECK $(PROGS)
  139.  
  140. @@ -446,11 +447,11 @@
  141.  install: installbin installman
  142.  
  143.  installbin: all
  144. -    @$(SHELL) installbin.sh $(INSTALLPERMS) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
  145. +    @$(SHELL) installbin.sh $(INSTALLPERMS) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) $(SCRIPTS)
  146.  
  147.  # revert to the previously installed version
  148.  revert:
  149. -    @$(SHELL) revert.sh $(BINDIR) $(PROGS)
  150. +    @$(SHELL) revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
  151.  
  152.  installman:
  153.      @$(SHELL) installman.sh $(MANDIR)
  154. diff -u -r --new-file last-version/source/change-log samba-1.9.14alpha5/source/change-log
  155. --- last-version/source/change-log    Sat Jul  1 15:05:38 1995
  156. +++ samba-1.9.14alpha5/source/change-log    Mon Jul  3 14:30:12 1995
  157. @@ -1474,14 +1474,15 @@
  158.      - extensive changes to ipc.c and miscellaneous other changes 
  159.      from ad@papyrus.hamburg.com (Andreas Degert). Should especially
  160.      help OS/2 users
  161. -    
  162. +    - added name release to nmbd
  163. +    - relesed alpha4
  164. +    - fixed "SOLARIS" to SUNOS5 in Makefile
  165. +    - several minor fixups to get it to compile on aix, osf1, ultrix,
  166. +    solaris and sunos    
  167.  
  168.  ==========
  169.  todo:
  170.  
  171. -make samba react to name registrations, and master browser
  172. -requests/announcements.
  173. -
  174.  proper include file handling - need to keep a date for each include file
  175.  (linked list?) and check for changes against those dates. A pain.
  176.  
  177. @@ -1489,15 +1490,14 @@
  178.  
  179.  implement SMBmove and SMBcopy ??
  180.  
  181. -change the check and mkdir targets to be portable - probably via scripts
  182. -
  183.  add option to print more info about locked files (full path, share name
  184.  etc)
  185.  
  186. -patch for user and group names in status.c
  187. -
  188.  sort by inode on opendir?
  189.  
  190. +rename only if not rdonly?
  191. +
  192. +no refresh/reg of new IP? or send wack and challenge owner?
  193.  
  194.  
  195.  new nmb.conf file
  196. diff -u -r --new-file last-version/source/checkos.sh samba-1.9.14alpha5/source/checkos.sh
  197. --- last-version/source/checkos.sh    Thu Jun 29 18:21:39 1995
  198. +++ samba-1.9.14alpha5/source/checkos.sh    Mon Jul  3 14:06:57 1995
  199. @@ -15,3 +15,4 @@
  200.  exit 1
  201.  fi
  202.  
  203. +exit 0
  204. diff -u -r --new-file last-version/source/includes.h samba-1.9.14alpha5/source/includes.h
  205. --- last-version/source/includes.h    Fri Jun 30 17:14:21 1995
  206. +++ samba-1.9.14alpha5/source/includes.h    Mon Jul  3 11:49:41 1995
  207. @@ -206,6 +206,7 @@
  208.  #include <errno.h>
  209.  #include <sys/wait.h>
  210.  #include <signal.h>
  211. +#define NO_MEMMOVE
  212.  #ifdef sun386
  213.  #define NO_STRFTIME
  214.  #define NO_UTIMBUF
  215. diff -u -r --new-file last-version/source/ipc.c samba-1.9.14alpha5/source/ipc.c
  216. --- last-version/source/ipc.c    Sat Jul  1 14:58:44 1995
  217. +++ samba-1.9.14alpha5/source/ipc.c    Mon Jul  3 14:08:50 1995
  218. @@ -258,13 +258,27 @@
  219.    p->stringlen = n;
  220.  }
  221.  
  222. +#ifdef __STDC__
  223.  static int package(struct pack_desc* p, ...)
  224.  {
  225. +#else
  226. +static int package(va_alist)
  227. +va_dcl
  228. +{
  229. +  struct pack_desc* p;
  230. +#endif
  231.    va_list args;
  232.    int needed=0, stringneeded;
  233.    char* str=NULL;
  234.    int is_string=0, stringused;
  235. +
  236. +#ifdef __STDC__
  237.    va_start(args,p);
  238. +#else
  239. +  va_start(args);
  240. +  p = va_arg(args,struct pack_desc *);
  241. +#endif
  242. +
  243.    if (!*p->curpos) {
  244.      if (!p->subcount)
  245.        p->curpos = p->format;
  246. @@ -273,14 +287,15 @@
  247.        p->subcount--;
  248.      }
  249.    }
  250. - #if CHECK_TYPES
  251. +#if CHECK_TYPES
  252.    str = va_arg(args,char*);
  253.    if (strncmp(str,p->curpos,strlen(str)) != 0) {
  254.      DEBUG(2,("type error in package: %s instead of %*s in %s/%s\n",str,
  255.            strlen(str),p->curpos,p->format1,p->format2));
  256. +    va_end(args);
  257.      return 0;
  258.    }
  259. - #endif
  260. +#endif
  261.    stringneeded = -1;
  262.    switch( *p->curpos++ ) {
  263.    case 'W':            /* word (2 byte) */
  264. diff -u -r --new-file last-version/source/local.h samba-1.9.14alpha5/source/local.h
  265. --- last-version/source/local.h    Thu Jun 29 09:30:23 1995
  266. +++ samba-1.9.14alpha5/source/local.h    Mon Jul  3 11:08:36 1995
  267. @@ -104,6 +104,10 @@
  268.  #define REGISTRATION_INTERVAL (10*60)
  269.  #define NMBD_INETD_TIMEOUT (120)
  270.  #define NMBD_MAX_TTL (24*60*60)
  271. +#define LPQ_LOCK_TIMEOUT (5)
  272. +
  273. +/* the following are in milliseconds */
  274. +#define LOCK_RETRY_TIMEOUT (100)
  275.  
  276.  /* do you want to dump core (carefully!) when an internal error is
  277.     encountered? Samba will be careful to make the core file only
  278. diff -u -r --new-file last-version/source/locking.c samba-1.9.14alpha5/source/locking.c
  279. --- last-version/source/locking.c    Thu Jun 29 18:18:43 1995
  280. +++ samba-1.9.14alpha5/source/locking.c    Mon Jul  3 11:11:42 1995
  281. @@ -123,7 +123,34 @@
  282.  #endif
  283.  }
  284.  
  285. +/*******************************************************************
  286. +lock a file - returning a open file descriptor or -1 on failure
  287. +The timeout is in seconds. 0 means no timeout
  288. +********************************************************************/
  289. +int file_lock(char *name,int timeout)
  290. +{  
  291. +  int fd = open(name,O_RDWR|O_CREAT,0666);
  292. +  time_t t=0;
  293. +  if (fd < 0) return(-1);
  294.  
  295. +  if (timeout) t = time(NULL);
  296. +  while (!timeout || (time(NULL)-t < timeout)) {
  297. +    if (fcntl_lock(fd,F_SETLK,0,1,F_WRLCK)) return(fd);    
  298. +    msleep(LOCK_RETRY_TIMEOUT);
  299. +  }
  300. +  
  301. +  return(-1);
  302. +}
  303. +
  304. +/*******************************************************************
  305. +unlock a file locked by file_lock
  306. +********************************************************************/
  307. +void file_unlock(int fd)
  308. +{
  309. +  if (fd<0) return;
  310. +  fcntl_lock(fd,F_SETLK,0,1,F_UNLCK);
  311. +  close(fd);
  312. +}
  313.  
  314.  
  315.  /****************************************************************************
  316. diff -u -r --new-file last-version/source/nameserv.c samba-1.9.14alpha5/source/nameserv.c
  317. --- last-version/source/nameserv.c    Sun Jul  2 02:08:39 1995
  318. +++ samba-1.9.14alpha5/source/nameserv.c    Mon Jul  3 13:48:38 1995
  319. @@ -863,8 +863,7 @@
  320.        }
  321.      } 
  322.      
  323. -    if (n>=0 && names[n].ttl>0) {
  324. -      names[n].ttl = ttl;
  325. +    if (n>=0 && names[n].ttl>0 && !memcmp(&names[n].ip,&ip,sizeof(ip))) {
  326.        names[n].ip = ip;
  327.        names[n].ttl = ttl;
  328.        names[n].start_time = time(NULL);
  329. diff -u -r --new-file last-version/source/password.c samba-1.9.14alpha5/source/password.c
  330. --- last-version/source/password.c    Fri Jun 30 23:45:39 1995
  331. +++ samba-1.9.14alpha5/source/password.c    Mon Jul  3 11:44:10 1995
  332. @@ -1150,7 +1150,9 @@
  333.  
  334.    DEBUG(3,("password server %s accepted the password\n",pserver));
  335.  
  336. +#ifndef KEEP_PASSWORD_SERVER_OPEN
  337.    close(password_client); password_client=-1;
  338. +#endif
  339.  
  340.    return(True);
  341.  }
  342. diff -u -r --new-file last-version/source/printing.c samba-1.9.14alpha5/source/printing.c
  343. --- last-version/source/printing.c    Sat Jul  1 14:26:15 1995
  344. +++ samba-1.9.14alpha5/source/printing.c    Mon Jul  3 11:06:19 1995
  345. @@ -379,7 +379,7 @@
  346.      
  347.      for (count=0; count<8 && next_token(&line,tok[count],NULL); count++) ;
  348.        
  349. -    /* we must get 8 tokens for time calculation, otherwise 3 will do*/
  350. +    /* we must get 8 tokens for time calculation, otherwise 3 will do */
  351.      if (count < 3) return(False);
  352.      
  353.      /* first token must be printer name (cannot check ??) */
  354. @@ -517,8 +517,8 @@
  355.    FILE *f;
  356.    struct stat sbuf;
  357.    BOOL dorun=True;
  358. -  int fd = -1;
  359.    int cachetime = lp_lpqcachetime();
  360. +  int lfd = -1;
  361.  
  362.    *line = 0;
  363.  
  364. @@ -541,30 +541,24 @@
  365.    standard_sub(cnum,syscmd);
  366.  
  367.    sprintf(outfile,"/tmp/lpq.%08x",str_checksum(syscmd));
  368. -
  369. -  if (!lpq_cache_reset && 
  370. -      cachetime && 
  371. -      stat(outfile,&sbuf) == 0 && 
  372. -      (time(NULL) - sbuf.st_mtime)<cachetime) {
  373. -    DEBUG(3,("Using cached lpq output\n"));
  374. -    dorun = False;
  375. -  }
  376. -
  377. -  if (dorun) {
  378. -    int fd = open(outfile,O_RDWR);
  379. -    if (fd >= 0) {
  380. -      flock(fd,LOCK_EX);
  381. -      if (!lpq_cache_reset &&
  382. -      cachetime && fstat(fd,&sbuf) == 0 && 
  383. -      (time(NULL) - sbuf.st_mtime)<cachetime) {
  384. +  
  385. +  if (!lpq_cache_reset && cachetime && !stat(outfile,&sbuf)) 
  386. +    {
  387. +      if (time(NULL) - sbuf.st_mtime < cachetime) {
  388.      DEBUG(3,("Using cached lpq output\n"));
  389.      dorun = False;
  390. -    flock(fd,LOCK_UN);
  391. -    close(fd);
  392. -    fd = -1;
  393.        }
  394. +
  395. +      if (dorun) {
  396. +    lfd = file_lock(outfile,LPQ_LOCK_TIMEOUT);
  397. +    if (lfd<0 || 
  398. +        (!fstat(lfd,&sbuf) && (time(NULL) - sbuf.st_mtime)<cachetime)) {
  399. +      DEBUG(3,("Using cached lpq output\n"));
  400. +      dorun = False;
  401. +      file_unlock(lfd); lfd = -1;
  402. +    }
  403. +      }
  404.      }
  405. -  }
  406.  
  407.    if (dorun) {
  408.      ret = smbrun(syscmd,outfile);
  409. @@ -574,8 +568,10 @@
  410.    lpq_cache_reset = False;
  411.  
  412.    f = fopen(outfile,"r");
  413. -  if (!f)
  414. +  if (!f) {
  415. +    if (lfd >= 0) file_unlock(lfd);
  416.      return(0);
  417. +  }
  418.  
  419.    if (status)
  420.      strcpy(status->message,"");
  421. @@ -600,13 +596,12 @@
  422.  
  423.    fclose(f);
  424.  
  425. -  if (fd >= 0) {
  426. -    flock(fd,LOCK_UN);
  427. -    close(fd);
  428. -    fd = -1;
  429. -  }
  430. +  if (lfd >= 0) file_unlock(lfd);
  431.  
  432. -  if (!cachetime) unlink(outfile);
  433. +  if (!cachetime) 
  434. +    unlink(outfile);
  435. +  else
  436. +    chmod(outfile,0666);
  437.    return(count);
  438.  }
  439.  
  440. diff -u -r --new-file last-version/source/server.c samba-1.9.14alpha5/source/server.c
  441. --- last-version/source/server.c    Sat Jul  1 14:49:28 1995
  442. +++ samba-1.9.14alpha5/source/server.c    Mon Jul  3 09:45:03 1995
  443. @@ -1627,8 +1627,6 @@
  444.            close(Client); /* The parent doesn't need this socket */
  445.  #endif
  446.      }
  447. -      close(s);
  448. -      return False;
  449.      }
  450.    else
  451.      {
  452. diff -u -r --new-file last-version/source/smb.h samba-1.9.14alpha5/source/smb.h
  453. --- last-version/source/smb.h    Sat Jul  1 14:01:04 1995
  454. +++ samba-1.9.14alpha5/source/smb.h    Mon Jul  3 10:30:56 1995
  455. @@ -548,6 +548,9 @@
  456.  };
  457.  
  458.  /* and a few prototypes */
  459. +void msleep(int t);
  460. +int file_lock(char *name,int timeout);
  461. +void file_unlock(int fd);
  462.  int find_service(char *service);
  463.  int TvalDiff(struct timeval *tvalold,struct timeval *tvalnew);
  464.  int smb_offset(char *p,char *buf);
  465. diff -u -r --new-file last-version/source/smbtar samba-1.9.14alpha5/source/smbtar
  466. --- last-version/source/smbtar    Thu Jan  1 10:00:00 1970
  467. +++ samba-1.9.14alpha5/source/smbtar    Thu Jun 29 17:58:36 1995
  468. @@ -0,0 +1,87 @@
  469. +#!/bin/sh
  470. +# 
  471. +
  472. +# edit this to show where your smbclient is
  473. +SMBCLIENT="./smbclient"
  474. +
  475. +server=""
  476. +service=backup
  477. +password=""
  478. +username=$LOGNAME
  479. +verbose="/dev/null"
  480. +log="-d 2"
  481. +newer=""
  482. +blocksize=""
  483. +tarcmd="tar c"
  484. +TF=${TAPE-tar.out}
  485. +
  486. +USAGE=$0" [ -pxut ] -s server\n
  487. +  -p password\n
  488. +  -x service\n
  489. +  -n newer\n
  490. +  -i incremental\n
  491. +  -b blocksize\n
  492. +  -r restore\n
  493. +  -l log\n
  494. +  -u user\n
  495. +  -r restore\n
  496. +  -t tape"
  497. +while getopts ril:b:n:vs:p:x:u:t: c; do
  498. +  case $c in
  499. +   r) tarcmd="tar x"
  500. +      ;;
  501. +   i) incremental="tarmode inc reset"
  502. +      ;;
  503. +   l) log="-d $OPTARG"
  504. +      ;;
  505. +   n) if [ -f $OPTARG ]; then 
  506. +        newer="newer $OPTARG"
  507. +      else
  508. +        echo $0: Warning, $OPTARG not found
  509. +      fi
  510. +      ;;
  511. +   s) server=$OPTARG
  512. +      ;;
  513. +   b) blocksize="blocksize $OPTARG"
  514. +      ;;
  515. +   p) password=$OPTARG
  516. +      ;;
  517. +   x) service=$OPTARG
  518. +      ;;
  519. +   t) TF=$OPTARG
  520. +      ;;
  521. +   u) username=$OPTARG
  522. +      ;;
  523. +   v) verbose="/dev/tty"
  524. +      ;;
  525. +   \?) echo $USAGE
  526. +       exit 2
  527. +      ;;
  528. +  esac
  529. +done
  530. +shift `expr $OPTIND - 1`
  531. +
  532. +if [ $service = "" ]; then
  533. +  echo $USAGE
  534. +  exit 1
  535. +fi
  536. +
  537. +if [ -n $verbose ]; then
  538. +      echo server is $server
  539. +      echo service is $service
  540. +      echo tar cmd is $tarcmd
  541. +      echo password is $password
  542. +      echo share is $service
  543. +      echo tape is $TF
  544. +fi
  545. +
  546. +(
  547. +    echo "lowercase"
  548. +    echo $newer
  549. +    echo $blocksize
  550. +    echo $incremental
  551. +    echo $tarcmd $TF
  552. +) | $SMBCLIENT "\\\\$server\\$service" $password -U $username -N $log > $verbose
  553. +
  554. diff -u -r --new-file last-version/source/util.c samba-1.9.14alpha5/source/util.c
  555. --- last-version/source/util.c    Sat Jul  1 14:56:52 1995
  556. +++ samba-1.9.14alpha5/source/util.c    Mon Jul  3 10:39:40 1995
  557. @@ -2481,6 +2481,29 @@
  558.    return(ret);
  559.  }
  560.  
  561. +/*******************************************************************
  562. +sleep for a specified number of milliseconds
  563. +********************************************************************/
  564. +void msleep(int t)
  565. +{
  566. +  int tdiff=0;
  567. +  struct timeval tval,t1,t2;  
  568. +  fd_set fds;
  569. +
  570. +  GetTimeOfDay(&t1);
  571. +  GetTimeOfDay(&t2);
  572. +  
  573. +  while (tdiff < t) {
  574. +    tval.tv_sec = (t-tdiff)/1000;
  575. +    tval.tv_usec = 1000*((t-tdiff)%1000);
  576. +    FD_ZERO(&fds);
  577. +    select(255,NULL,SELECT_CAST &fds,NULL,&tval);
  578. +
  579. +    GetTimeOfDay(&t2);
  580. +    tdiff = TvalDiff(&t1,&t2);
  581. +  }
  582. +}
  583.  
  584.  /****************************************************************************
  585.  check if a string is part of a list
  586. @@ -3395,7 +3418,7 @@
  587.  
  588.    {
  589.      int one=1;
  590. -    setsockopt(res,SOL_SOCKET,SO_REUSEADDR,&one,sizeof(one));
  591. +    setsockopt(res,SOL_SOCKET,SO_REUSEADDR,(char *)&one,sizeof(one));
  592.    }
  593.  
  594.    return res;
  595. diff -u -r --new-file last-version/source/version.h samba-1.9.14alpha5/source/version.h
  596. --- last-version/source/version.h    Sun Jul  2 02:17:52 1995
  597. +++ samba-1.9.14alpha5/source/version.h    Mon Jul  3 15:00:12 1995
  598. @@ -1 +1 @@
  599. -#define VERSION "1.9.14alpha4"
  600. +#define VERSION "1.9.14alpha5"
  601.